#pragma once

#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
typedef int HeapDataType;
typedef struct Heap
{
	HeapDataType* a;
	int size;
	int capacity;
}Heap;

void HeapInit(Heap* php);

void HeapDestory(Heap* php);

void HeapPrintf(Heap* php);

void HeapPushBack(Heap* php, HeapDataType x);

void AdjustUp(HeapDataType* a, int child);

void Swap(int* x, int* y);

void HeapPop(Heap* php);

bool HeapEmpty(Heap* php);

void AdjustDown(HeapDataType* a, int n , int parent);

int HeapSize(Heap* php);

HeapDataType HeapTop(Heap* php);